package tc.de.krawallmann.gravoblocks.game.model;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.state.StateBasedGame;

import tc.de.krawallmann.event.GameOverListener;
import tc.de.krawallmann.event.PauseListener;
import tc.de.krawallmann.event.ScoreListener;

public interface IGameRule {
	void update(final GameContainer container, final StateBasedGame game, final int delta);
	

	void reset();
	
	/**
	 * Adds the game over listener.
	 * 
	 * @param listener
	 *            the listener
	 */
void addGameOverListener(final GameOverListener listener);

	/**
	 * Adds the pause listener.
	 * 
	 * @param listener
	 *            the listener
	 */
	void addPauseListener(final PauseListener listener);

	/**
	 * Adds the score listener.
	 * 
	 * @param listener
	 *            the listener
	 */
	void addScoreListener(final ScoreListener listener);

	/**
	 * Removes the game over listener.
	 * 
	 * @param listener
	 *            the listener
	 */
	void removeGameOverListener(final GameOverListener listener);

	/**
	 * Removes the pause listener.
	 * 
	 * @param listener
	 *            the listener
	 */
	void removePauseListener(final PauseListener listener);

	/**
	 * Removes the score listener.
	 * 
	 * @param listener
	 *            the listener
	 */
	void removeScoreListener(final ScoreListener listener);
	

	void clearScoreListeners();
	

	void clearPauseListeners();
	

	void clearGameOverListeners();
}
